<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
    <title>会员登录</title>
    <link href="style.css-v=2.0.css" rel="stylesheet" type="text/css" />
    <link href="content.css-v=2.0.css"  rel="stylesheet" type="text/css" />
    <script src="/js/jquery.min.js"></script>
    <script src="/js/jquery.form.js"></script>
    <script src="/layer/layer.min.js"></script>
</head>
<body>

<div class="header">
    <div class="wrap">
        <ul class="fl logo"><a href="/index">
            <img height="50" src="${pageContext.request.contextPath}/72c7b7595ea7c2270f47da67815ac4f1.png"/></a>
        </ul>
        <ul class="mobile-nav"><span class="mob-nav-btn">Menu</span></ul>
        <ul class="nav fl">
            <li class="on" style="border:0;"><a href="/index">首页</a></li>
            <li><a href="#">关于我们</a></li>
            <li><a href="13.html">入驻条例</a></li>
            <li><a href="/news">行业新闻</a></li>
            <li><a href="/announcement">平台公告</a></li>
        </ul>
        <ul class="fr member">
            <c:if test="${empty user}">
                <a href="zhuce">注册</a> <span></span>
                <a href="login">登录</a>
            </c:if>
            <c:if test="${not empty user}">
                <a href="/isUserAdmin?type=1">个人中心</a> <span></span>
                <a href="javascript:void(0)" onclick="exit()">退出</a>
                <script>
                    function exit() {
                        //询问框
                        layer.confirm('是否真的退出', {
                            btn: ['退出','取消'] //按钮
                        }, function(){
                            $.ajax({
                                url:"exit",//请求的地址
                                type:"post",//请求方式
                                dataType:"json",//请求的内容格式
                                success:function(data){
                                    if (data.result==true){
                                        layer.msg(data.msg, {
                                            time : 2000
                                        }, function() {
                                            window.location.href = window.location.href;
                                        });
                                    }
                                }
                            });
                        }, function(){
                            layer.msg("取消成功", {
                                time : 2000
                            }, function() {
                                window.location.href = window.location.href;
                            });
                        });
                    }
                </script>
            </c:if>

        </ul>
        <form action="#" method="get">
            <ul class="fr search-box">
                <input type="hidden" name="pid" value="">
                <input name="sh_keywords" class="kw fl" type="text" value="输入关键词搜索…"
                       onfocus="if(this.value=='输入关键词搜索…')this.value='';"/><input type="submit" class="sbmt fr"
                                                                                  value=""/></ul>
        </form>
    </div>
</div>

<script>
    function checkform()
    {
        var f=document.loginbox;
        if($.trim(f.username.value)=='') {
            alert("对不起,请输入账号!");
            f.username.focus();
            return false;
        }

        if($.trim(f.pswd.value)=='') {
            alert("对不起,请输入密码!");
            f.pswd.focus();
            return false;
        }
        if($.trim(f.verifycode.value)=='') {
            alert("对不起,请输入验证码!");
            f.verifycode.focus();
            return false;
        }
    }

</script>
<div class="clear"></div>
<div class="wrap">
    <div class="reg" style="padding:120px 0;">
        <div class="form fr" style="width:440px; padding:20px;">

            <h3>用户注册</h3>
            <form action="/user/inster" method="post" name="insterUser" id="insterUser">
                <table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="25%">用户名：</td>
                        <td><input name="username" type="text" class="input_box" id="username" size="20" maxlength="20" placeholder="请填写用户名" style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <td >密　码：</td>
                        <td><input name="password" type="password" class="input_box" id="password" size="20" maxlength="20"  placeholder="请输入密码..." style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <td >财产密码：</td>
                        <td><input name="zfpassword" type="password" class="input_box" id="zfpassword" size="20" maxlength="20" placeholder="请输入财产密码..." style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <td width="25%">电话：</td>
                        <td><input name="tel" type="text" class="input_box" id="tel" size="20" maxlength="20" placeholder="请输入电话号码" style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <td width="25%">地址：</td>
                        <td><input name="uadd" type="text" class="input_box" id="uadd" size="20" maxlength="20" placeholder="请输入地址" style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <td align="center"><input name="FromURL" type="hidden" id="FromURL" value="#" /></td>
                        <td><input name="btnSubmit" id="btnSubmit" type="submit" class="btn" value="立即注册" style="width:310px"/></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<script>

    $(function() {
        $("#insterUser").ajaxForm({
                type:"post",
				dataType : 'json',
				success : function(data) {
                    console.log(data);
                    if(data.result==false){
                        layer.msg(data.msg, {
                                            time : 2000
                                        }, function() {
                                        });
                    }else{
                        layer.msg(data.msg, {
                                            time : 2000
                                        }, function() {
                                            window.location.href = "/login";
                                        });
                    }
				}
	})
    })



</script>
<style>
    .footer .footer-l{
        width: 605px !important;
        float: left;
        text-align: left;
    }
    .footer .footer-r{
        width: 495px;
        height: 82px;
        float: right;

    }
    .fter-r {
        width: 165px;
        float: right;
        text-align: left;
    }
    .fter-l {
        width: 136px;
        float: right;
        text-align: left;
    }

    .fter-l span{
        font-size:20px;

    }

    .footer-r span{
        display: block;
        text-align: left;
        line-height: 28px;
    }
    .ft-links {
        padding-left: 20px;
        color: #fff;
    }.ft-nav a {
         display: inline-block;
         padding: 0 20px;
         color: #fff;
     }
    .foot_copy {
        background: #373d41;
        line-height: 2;
        padding: 30px 0;
        text-align: center;
        font-family: Arial, Helvetica, sans-serif;
        color: #fff;
    }
    .ft-links a {
        padding: 0 5px;
        display: inline-block;
        color: #fff;
    }
    .copyright {
        padding-left: 20px;
    }
    .xinren{
        height: 70px;
        margin-top: 20px;
    }
    .xinren img {
        height: 70px;
        padding: 0px 5px;
    }

    .appimg {
        width: 186px;
        float: right;
        height: 80px;
    }
    .appimg img {
        width: 80px;
        height: 80px;
        margin-left: 10px;
        overflow: hidden;
    }
</style>
<div class="footer">
    <div class="foot_copy wow bounceInUp">
        <div class="wrap">
            <div class="footer-l">
                <div class="copyright">湘南学院毕业设计作品->农业生态认养
                    作者：****
                </div>
            </div>
        </div>

    </div>
</div>
</body>
</html>